/*入口文件*/
import Vue from 'vue'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
/*导入格式化时间的插件*/
import moment from 'moment'
//mui
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
//mint-ui
import {Button, Header, Swipe, SwipeItem} from 'mint-ui'
import app from './App.vue'
import router from './router.js'

Vue.use(VueRouter)


Vue.use(VueResource)
/*设置请求的根路径*/
Vue.http.options.root = 'http:/vue.studyit.io';


/*定义全局的过滤器*/
Vue.filter('dataFormat', function (dataStr, pattern = "YYY-MM-DD HH:mm:ss") {
    return moment(dataStr).format(pattern);
})

Vue.component(Header.name, Header);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button)


var vm = new Vue({
    el:'#app',
    render: c => c(app),
    router
})


